package com.flycms.module.document.dao;

import com.flycms.module.document.model.Document;
import com.flycms.module.document.param.DocQueryParam;
import com.flycms.module.document.param.DocumentParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DocumentDao {

    List<Document> selectByType(@Param("type") Integer type);

    List<Document> selectByName(@Param("name") String name);

    Document getDocById(@Param("id") Long id);

    void insertSelective(Document document);

    int count(@Param("param") DocQueryParam param);

    List<Document> selectPage(@Param("param") DocQueryParam param,
                              @Param("index") int index,
                              @Param("size") int pageSize);

    void del(@Param("id") Long id);

    void update(Document document);
}
